<template>
    <div class="home-center">
        <div class="left">
            <home-center-left />
        </div>
        <div class="center">
            <div class="btns">
                <div class="btn success">
                    <span>正常 {{ deviceCount.normal }}</span>
                </div>
                <div class="btn warn">
                    <span>待处理 {{ deviceCount.awaitDispose }}</span>
                </div>
                <div class="btn error">
                    <span>报警 {{ deviceCount.warning }}</span>
                </div>
            </div>
        </div>
        <div class="right">
            <home-center-right />
        </div>
        <slot></slot>
    </div>
</template>

<script setup>
import homeCenterLeft from "./homeCenterLeft.vue";
import homeCenterRight from "./homeCenterRight.vue";
defineProps({
    deviceCount: {
        type: Object,
        default: () => ({})
    }
});
</script>

<style lang="less" scoped>
.home-center {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    .left,
    .right {
        box-sizing: border-box;
        width: 336px;
        height: 724px;
        padding: 10px 11px;
        background: rgba(27, 54, 70, 0.6);
        z-index: 5;
    }
    .right {
        padding: 20px 11px 0 11px;
    }
    .center {
        align-self: flex-end;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 1251px;
        height: 111px;
        background: url("@/assets/image/home/home-center.png") center/100% 100% no-repeat;
        z-index: 5;
        .btns {
            display: flex;
            align-items: center;
            margin-top: 36px;
            .btn {
                width: 180px;
                height: 50px;
                margin-left: 15px;
                line-height: 50px;
                color: #fff;
                span {
                    margin-left: 80px;
                }
            }
            .success {
                background: url("@/assets/image/home/success.png") center/100% no-repeat;
            }
            .error {
                background: url("@/assets/image/home/error.png") center/100% no-repeat;
            }
            .warn {
                background: url("@/assets/image/home/warn.png") center/100% no-repeat;
            }
        }
    }
}
</style>
